<include file="../Public/_header.html" />
<div class="so_main">
		  
		  <!-------- 搜索开始 -------->
		  <div id="search_div" rel='0'>
		  	<div class="page_tit">
		  		搜索支付纪录[ <a href="javascript:void(0);" onclick="_show_searcharea();">隐藏</a> ]
		  	</div>
				
				<div class="sform">
					<form method="post" action="{:U('/Payment/index')}" id="searchForm">
						<input id="pno" name="pno" type="hidden" value="1">
						<dl>
							<span>交易编号：</span>
					        <input name="trade_no" type="text" value="{$trade_no}">
					        <span>支付项ID：</span>
					        <input name="item_id" type="text" value="{$item_id}">
					        <span>支付用户：</span>
					        <input name="user_email" type="text" value="{$user_email}">
					       	
					    </dl>	
					    <dl>
					    	<span>支付类型：</span>
						    	<input id="pay_type_desc" type="text" value="{$pay_type|getCategoryName}" 
					      					onclick="ui.box.load(
					    											'{:U('Index://Public/showtree',array('code'=>'pay','onclick'=>'pay_tmp_setselectdict'))}'
					    											,{ title:'选择支付类型' })"
					      					readonly>
					      		<input id="pay_type" name="pay_type" type="hidden" value="{$pay_type}">
									<script>
											function pay_tmp_setselectdict(rel,txt){
									    		$('#pay_type_desc').val(txt);
									    		$('#pay_type').val(rel);
									    }
									</script>
					      	<span>支付机构：</span>
					      
						    	<input id="pay_service_desc" type="text" value="{$pay_service|getCategoryName}" 
					      					onclick="ui.box.load(
					    											'{:U('Index://Public/showtree',array('code'=>'payprovider','onclick'=>'pay_service_tmp_setselectdict'))}'
					    											,{ title:'选择支付提供商' })"
					      					readonly>
					      	<input id="pay_service" name="pay_service" type="hidden" value="{$pay_service}">
									<script>
											function pay_service_tmp_setselectdict(rel,txt){
									    		$('#pay_service_desc').val(txt);
									    		$('#pay_service').val(rel);
									    }
									</script>
							<span>充值类型：</span>
						    	<input id="sub_pay_type_desc" type="text" value="{$sub_pay_type|getCategoryName}" 
					      					onclick="ui.box.load(
					    											'{:U('Index://Public/showtree',array('code'=>'charge','onclick'=>'charge_tmp_setselectdict'))}'
					    											,{ title:'选择充值类型' })"
					      					readonly>
					      		<input id="sub_pay_type" name="sub_pay_type" type="hidden" value="{$sub_pay_type}">
									<script>
											function charge_tmp_setselectdict(rel,txt){
									    		$('#sub_pay_type_desc').val(txt);
									    		$('#sub_pay_type').val(rel);
									    }
									</script>
					    </dl>
					    <dl>
					    	<span>是否确认：</span>
							&nbsp;&nbsp;
					      	<input name="is_confirmed" type="radio" value="all" <eq name="is_confirmed" value="all">checked</eq>>全部
					      	&nbsp;&nbsp;&nbsp;
					        <input name="is_confirmed" type="radio" value="Y" <eq name="is_confirmed" value="Y">checked</eq>>是
					        &nbsp;&nbsp;&nbsp;&nbsp;
					        <input name="is_confirmed" type="radio" value="N" <eq name="is_confirmed" value="N">checked</eq>>否
					    	<span>是否有效：</span>
							&nbsp;&nbsp;
					      	<input name="enable" type="radio" value="all" <eq name="enable" value="all">checked</eq>>全部
					      	&nbsp;&nbsp;&nbsp;
					        <input name="enable" type="radio" value="Y" <eq name="enable" value="Y">checked</eq>>是
					        &nbsp;&nbsp;&nbsp;&nbsp;
					        <input name="enable" type="radio" value="N" <eq name="enable" value="N">checked</eq>>否
					        <span>价格范围：</span>
					        <input name='sprice' size="4" value='{$sprice}' type="text" style="width:65px">
              				&nbsp;-&nbsp;
              				<input name='bprice' size="4" value='{$bprice}' type="text" style="width:65px">
					    </dl> 
					    <dl>
					    	<input type="submit" class="btn_b" value="搜索" />
					    	&nbsp;&nbsp;&nbsp;&nbsp;
					    	<input type="reset" class="btn_b" value="清空" />
					    </dl>
					</form>
					<div class="clear"></div>
			  </div>
		  </div>
		  <!-------- 搜索结束 -------->
		  

  <div class="page_tit">支付纪录</div>
  <div class="Toolbar_inbox">
  		<a href="javascript:void(0);" class="btn_a" onclick="_show_searcharea();">
			<span>条件搜索</span>
		</a>
    	<a href="javascript:void(0);" class="btn_a" onclick="del();"><span>删除支付纪录</span></a>
  </div>
  
  <div class="list">
  <table id="goods_list" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th style="width:30px;">
        <input type="checkbox" id="checkbox_handle" onclick="table_checkAll(this)" value="0">
        <label for="checkbox"></label>
    </th>
    <th class="line_l">ID</th>
    <th class="line_l">有效|确认</th>
    <th class="line_l">交易编号</th>
    <th class="line_l">支付用户</th>
    <th class="line_l" style="text-align:center">支付类型</th>
    <th class="line_l" style="text-align:center">子类型</th>
    <th class="line_l" style="text-align:center">支付项</th>
    <th class="line_l" style="text-align:center">金额</th>
    <th class="line_l" style="text-align:right">币种</th>
    <th class="line_l" style="text-align:right">提供商</th>
    <th class="line_l" style="text-align:right">支付时间</th>
    <th class="line_l" style="text-align:right">创建时间</th>
    <th class="line_l" style="text-align:center">操作</th>
  </tr>
  <volist id="vo" name="datapage['data']">
      <tr overstyle='on' id="pay_{$vo.id}">
        <td><input type="checkbox" name="checkbox" id="checkbox2" onclick="table_checkon(this)" value="{$vo.id}"></td>
        <td>{$vo.id}</td>
        <td style="text-align:center;padding: 6px 0 6px 0px;color:red">
        	{$vo.enable}&nbsp;|&nbsp;{$vo.is_confirmed}</td>
        <td>{$vo.trade_no}</td>
        <php>$tmp_user = M('User')->where("id='".$vo['user_id']."'")->find();</php>
        <td>
	        	<a href="{:U('/Partner/index',array('parent_id'=>$partner_id))}" 
	        		id="price_title_{$vo.shelf_id}">{$tmp_user['uname']}</a>
        </td>
 		<td style="text-align:center">{$vo['pay_type']|getCategoryName}</td>
 		<td style="text-align:center">{$vo['sub_pay_type']|getCategoryName}</td>
		<td style="text-align:right">{$vo.item_id}</td>		
		<td style="text-align:right">{$vo.total_fee}</td>
		<td style="text-align:center">{$vo.currency}</td>
		<td style="text-align:right">{$vo.service|getCategoryName}</td>
		<td style="text-align:center">{:paramMillisecond2Date($vo['paytime'],'Y-m-d H:i', '未设置' )}</td>
		<td style="text-align:center">{:paramMillisecond2Date($vo['ctime'],'Y-m-d H:i', '未设置' )}</td>

        <td style="text-align:center">
            <a href="javascript:void(0);" title="查看详细的支付结果！">详情</a>
        </td>
      </tr>
  </volist>
  </table>

  </div>
  <div class="Toolbar_inbox">
    <div class="page_box">{$datapage['html']}</div>
  </div>
 
</div>

 <div class="clear"></div>

<script>
    //鼠标移动表格效果
    $(document).ready(function(){
    	table_init();
    });
    
    
    
    //删除分类
    function del(aid) {
        aid = aid ? aid : table_getChecked();
        aid = aid.toString();
        if(aid == '') return false;
		if(!confirm('确定删除么？')){
				return;
		}
        //提交删除
        $.post("{:U('/Shelf/doPutoff')}", {ids:aid}, function(res){
	        if(res == '1') {
		        aid = aid.split(',');
		        $.each(aid, function(i,n){
		            $('#partner_'+n).remove();
		        });
	            ui.success('删除成功');
	        }else {
	        	ui.success('删除失败');
	        }
        });
        
        
    }
</script>

<include file="../Public/_footer.html" />